{extend name="main"}

{block name="button"}
<!--{if auth('params')}-->
<a class="layui-btn layui-btn-sm layui-btn-primary" data-modal="{:url('params')}">{:lang('修改商城参数')}</a>
<!--{/if}-->
{/block}

{block name="content"}
<div class="layui-card padding-20 shadow">
    <div class="layui-card-header notselect">
        <span class="help-label">
            <b style="color:#333!important;">{:lang('商城参数')}</b>
        </span>
    </div>
    <div class="layui-card-body">
        <div class="layui-form-item">
            <div class="help-label"><b>{:lang('商城名称')}</b>Name</div>
            <label class="relative block">
                <input readonly value="{$data.name|default=''}" placeholder="请设置商城名称" class="layui-input layui-bg-gray">
            </label>
            <p class="help-block">请填写商城名称，将会在前端部分内容显示。</p>
        </div>
        <label class="layui-form-item relative block">
            <span class="help-label"><b>{:lang('前端域名')}</b>Domain H5</span>
            <input readonly class="layui-input layui-bg-gray" placeholder="请输入前端域名" required value='{$data.domain|default=""}'>
            <span class="help-block"><b>必填，</b>请填写前端域名，将使用在生成移动端链接使用。</span>
        </label>
        <div class="layui-form-item">
            <div class="help-label"><b>{:lang('账户余额')}</b>Balance</div>
            <div class="layui-input layui-bg-gray flex-x-center">
                {empty name='data.enable_balance'}
                <i class="layui-icon layui-icon-error margin-right-5 color-red"></i>未启用账户余额
                {else}
                <i class="layui-icon layui-icon-success color-green margin-right-5"></i>已启用账户余额
                {/empty}
            </div>
            <span class="help-block">开启账户余额之后，用户会增加余额账户，累积余额并可使用余额抵扣支付。</span>
        </div>
        <div class="layui-form-item">
            <div class="help-label"><b>{:lang('账户积分')}</b>Integral</div>
            <div class="layui-input flex-x-center layui-bg-gray">
                {empty name='data.enable_integral'}
                <i class="layui-icon layui-icon-error color-red margin-right-5"></i>未启用账户积分
                {else}
                <i class="layui-icon layui-icon-success color-green margin-right-5"></i>已启用账户积分
                {/empty}
            </div>
            <span class="help-block">开启账户积分之后，用户会增加积分账户，累积积分并可使用积分抵扣支付。</span>
        </div>
        <div class="layui-form-item">
            <div class="help-label"><b>{:lang('下单随减')}</b>Reduction</div>
            <div class="layui-input flex-x-center layui-bg-gray">
                {empty name='data.enable_reduct'}
                <i class="layui-icon layui-icon-error color-red margin-right-5"></i> 未启用下单随机减免金额
                {else}
                <i class="layui-icon layui-icon-success color-green font-s15 margin-right-5"></i>
                已启用下单随机减免金额，减免范围 [ {$data.reduct_min|default=0.00} - {$data.reduct_max|default=0.00} ] 元
                {/empty}
            </div>
            <span class="help-block">开启下单随减后，用户每次下单都会随机减免一定金额，最多不会超过订单金额。</span>
        </div>
        <div class="layui-form-item margin-bottom-0">
            <div class="layui-row layui-col-space10 portal-block-container notselect margin-bottom-0">
                <div class="help-label"><b>{:lang('内容管理')}</b>Content</div>
                {foreach $pages as $k => $v}
                <div class="layui-col-sm4 layui-col-md4 layui-col-lg3">
                    <!--{if auth('content')}-->
                    <div class="pointer" data-open="{:url('content')}?code={$k}">
                        <div class="portal-block-item nowrap think-bg-blue">
                            <div class="font-s14" style="opacity:0.6">编辑内容</div>
                            <div class="font-s15" style="opacity:0.8">{$v|default=''}</div>
                        </div>
                        <i class="portal-block-icon layui-icon layui-icon-form"></i>
                    </div>
                    <!--{else}-->
                    <div>
                        <div class="portal-block-item nowrap think-bg-violet">
                            <div class="font-s14" style="opacity:0.6">编辑内容</div>
                            <div class="font-s15" style="opacity:0.8">{$v|default=''}</div>
                        </div>
                        <i class="portal-block-icon layui-icon layui-icon-form"></i>
                    </div>
                    <!--{/if}-->
                </div>
                {/foreach}
            </div>
        </div>
    </div>
</div>
<!--{/if}-->
{/block}